<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <title>jQuery WeUI</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <meta name="description" content="">

    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/weui/lib/weui.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/weui/css/jquery-weui.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/weui/css/main.css">

</head>

<body ontouchstart>

<div class="weui-tab">
    <div class="weui-navbar">
        <a class="weui-navbar__item weui-bar__item--on" href="#tab1">
            待审批
        </a>
        <a class="weui-navbar__item" href="#tab2">
            审批通过
        </a>
        <a class="weui-navbar__item" href="#tab3">
            审批拒绝
        </a>
    </div>
    <div class="weui-tab__bd">
        <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
            <c:forEach items="${applyList}" var="record">
                <div class="weui-form-preview">
                    <div class="weui-form-preview__hd">
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">申请人</label>
                                <em class="weui-form-preview__value">${record.drinkPerson}</em>
                        </div>
                    </div>
                    <div class="weui-form-preview__bd">
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">职务</label>
                            <span class="weui-form-preview__value">${record.drinkRole}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">申请时间</label>
                            <span class="weui-form-preview__value">
                  <fmt:formatDate value="${record.drinkApplyTime}"
                                  pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">饮酒地点</label>
                            <span class="weui-form-preview__value">${record.drinkPlace}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">饮酒时间</label>
                            <span class="weui-form-preview__value">
            <fmt:formatDate value="${record.drinkStartTime}" pattern="yyyy-MM-dd HH:mm"></fmt:formatDate>
            到<fmt:formatDate value="${record.drinkEndTime}" pattern="yyyy-MM-dd HH:mm"></fmt:formatDate>
          </span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">申请理由</label>
                            <span class="weui-form-preview__value">${record.drinkReason}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">紧急联系人</label>
                            <span class="weui-form-preview__value">${record.emergencyPhone}</span>
                        </div>
                    </div>
                    <div class="weui-form-preview__ft">
                        <button type="submit" class="weui-form-preview__btn weui-form-preview__btn_primary"
                                id="toDealApply"
                                href="${pageContext.request.contextPath}/apply/toDealApply.do?recodeId=${record.id}">处理
                        </button>
                    </div>
                </div>
                <br>
            </c:forEach>
        </div>


        <div id="tab2" class="weui-tab__bd-item">
            <c:forEach items="${passList}" var="record">
                <div class="weui-form-preview">
                    <div class="weui-form-preview__hd">
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">申请人</label>
                            <em class="weui-form-preview__value">${record.drinkPerson}</em>
                        </div>
                    </div>
                    <div class="weui-form-preview__bd">
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">职务</label>
                            <span class="weui-form-preview__value">${record.drinkRole}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">申请时间</label>
                            <span class="weui-form-preview__value">
                  <fmt:formatDate value="${record.drinkApplyTime}"
                                  pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">饮酒地点</label>
                            <span class="weui-form-preview__value">${record.drinkPlace}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">饮酒时间</label>
                            <span class="weui-form-preview__value">
            <fmt:formatDate value="${record.drinkStartTime}" pattern="yyyy-MM-dd HH:mm"></fmt:formatDate>
            到<fmt:formatDate value="${record.drinkEndTime}" pattern="yyyy-MM-dd HH:mm"></fmt:formatDate>
          </span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">申请理由</label>
                            <span class="weui-form-preview__value">${record.drinkReason}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">紧急联系人</label>
                            <span class="weui-form-preview__value">${record.emergencyPhone}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">审批人</label>
                            <span class="weui-form-preview__value">${record.reportPersonName}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">审批时间</label>
                            <span class="weui-form-preview__value">
                                <fmt:formatDate value="${record.reportTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
                            </span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">审批意见</label>
                            <span class="weui-form-preview__value">${record.reportExplain}</span>
                        </div>
                    </div>
                </div>
                <br>
            </c:forEach>
        </div>


        <div id="tab3" class="weui-tab__bd-item">
            <c:forEach items="${rejectList}" var="record">
                <div class="weui-form-preview">
                    <div class="weui-form-preview__hd">
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">申请人</label>
                            <em class="weui-form-preview__value">${record.drinkPerson}</em>
                        </div>
                    </div>
                    <div class="weui-form-preview__bd">
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">职务</label>
                            <span class="weui-form-preview__value">${record.drinkRole}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">申请时间</label>
                            <span class="weui-form-preview__value">
                  <fmt:formatDate value="${record.drinkApplyTime}"
                                  pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">饮酒地点</label>
                            <span class="weui-form-preview__value">${record.drinkPlace}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">饮酒时间</label>
                            <span class="weui-form-preview__value">
            <fmt:formatDate value="${record.drinkStartTime}" pattern="yyyy-MM-dd HH:mm"></fmt:formatDate>
            到<fmt:formatDate value="${record.drinkEndTime}" pattern="yyyy-MM-dd HH:mm"></fmt:formatDate>
          </span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">申请理由</label>
                            <span class="weui-form-preview__value">${record.drinkReason}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">紧急联系人</label>
                            <span class="weui-form-preview__value">${record.emergencyPhone}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">审批人</label>
                            <span class="weui-form-preview__value">${record.reportPersonName}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">审批时间</label>
                            <span class="weui-form-preview__value">
                                <fmt:formatDate value="${record.reportTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
                            </span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">审批意见</label>
                            <span class="weui-form-preview__value">${record.reportExplain}</span>
                        </div>
                    </div>
                </div>
                <br>
            </c:forEach>
        </div>
    </div>
</div>
<div class="weui-tabbar">
    <a href="${pageContext.request.contextPath}/index.do" class="weui-tabbar__item weui-bar__item">
        <div class="weui-tabbar__icon">
        <img src="${pageContext.request.contextPath}/static/weui/images/index.png" alt="">
    </div>
        <p class="weui-tabbar__label">返回首页</p>
    </a>
</div>
<script src="${pageContext.request.contextPath}/static/weui/lib/jquery-2.1.4.js"></script>
<script src="${pageContext.request.contextPath}/static/weui/lib/fastclick.js"></script>
<script>
    $(function () {
        FastClick.attach(document.body);

        $("#toDealApply").click(function () {
            window.location.href = $(this).attr("href");
        });
    });
</script>
<script src="${pageContext.request.contextPath}/static/weui/js/jquery-weui.js"></script>
</body>
</html>
